//
//  ViewController.m
//  LHUILabelAttributed
//
//  Created by LH on 16/9/1.
//  Copyright © 2016年 LH. All rights reserved.
//

#import "ViewController.h"
#import "LHUILabelAttributed.h"

@interface ViewController ()
@property (weak, nonatomic) IBOutlet UILabel *label;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    NSString *str = @"人生若只如初见，何事秋风悲画扇。\n等闲变却故人心，却道故人心易变。\n骊山语罢清宵半，泪雨霖铃终不怨。\n何如薄幸锦衣郎，比翼连枝当日愿。";
    NSArray *arr=@[@"何事秋风悲画扇",@"霖铃终不怨"];
    
    NSMutableAttributedString *attS= [LHUILabelAttributed lh_changeFontAndFontSize:30 TotalString:str StartRange:0 LengthRange:3];
    // attS =[LHUILabelAttributed lh_changeFontAndColor:[UIColor redColor] TotalString:str StartRange:3 LengthRange:50];
    
    //attS=[LHUILabelAttributed lh_changeCorlorWithColor:[UIColor cyanColor] TotalString:str SubStringArray:arr];
    
    attS=[LHUILabelAttributed lh_changeFontAndColorFontSize:50 Color:[UIColor cyanColor] TotalString:str SubStringArray:arr];
    attS=[LHUILabelAttributed lh_changeStrikethroughAndTotalString:str LineType:1 LineColor:[UIColor redColor] StartRange:4 LengthRange:9];
    attS=[LHUILabelAttributed lh_changeParagraphAndTotalString:str LineSpace:5 ParagraphSpacing:5 FirstIndent:100 HeadIndent:50];
    //attS=[LHUILabelAttributed lh_changeUnderlineAndTotalString:str LineType:NSUnderlineStyleSingle StartRange:5 LengthRange:8];
    // attS=[LHUILabelAttributed lh_changeLineAndTextSpaceWithTotalString:str LineSpace:10 textSpace:20];
    // attS=[LHUILabelAttributed lh_changeLineSpaceWithTotalString:str LineSpace:20];
    _label.attributedText=attS;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
